FROM hz-office-registry.ywsoftware.com/base/node:12.16.2-buster AS build
WORKDIR /app
COPY package*.json ./
RUN npm config set sass_binary_site http://nexus.ywsoftware.com/repository/node-sass/ && \
	npm install --registry=http://nexus.ywsoftware.com/repository/npm-proxy/
COPY . ./
RUN npm run build

FROM hz-office-registry.ywsoftware.com/base/nginx:alpine-vue
COPY --from=build /app/dist /usr/share/nginx/html/
EXPOSE 80 443
